package com.knowswift.common.bean.project.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.knowswift.common.annotation.SerialCode;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Data
@TableName(autoResultMap = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Module {
    @TableId
    private String moduleId;
    private Integer moduleType;
    @SerialCode(length = 15)
    private String moduleSerialCode;
    private String moduleName;
    private Integer moduleOrder;
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<Project> projects;
    private Integer monitorInterval;
    @JsonIgnore
    private Integer isDelete;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;
}
